<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>StringHelper Demo</title>
    <script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script>
    <script type="text/javascript" src="StringHelper.js"></script>
    <script type="text/javascript">
        $(function(){
            //var str1 = " a b c ";
            //$("body").append("\n字段：" + str1 + ",长度为：" + str1.length + ",调用Trim()方法后：" + str1.Trim() + ",长度为：" + str1.Trim().length + ",调用ToLeft(2)方法后：" + str1.ToLeft(2) + "<br />");
			
			var html = "<input name=\"txt\" type=\"text\" value=\"{0}\" />";
			$("#testDIV").html(StringHelper.FormatStr(html,'"test"'));
        })
    </script>
</head>
<body>
    input1:<input id="mytext" name="txt" type="text" value=" 123 " /><br />
    input2:<input name="txt" type="text" value=" 456 " /><br />
    input3:<input name="txt" type="text" value=" 789 " /><br />
    <br />
	
	<div id="testDIV">
	
	</div>
</body>
</html>